package com.lw.mybatis.test;

import com.lw.mybatis.mapper.ItemMapper;
import com.lw.mybatis.mapper.OrderMapper;
import com.lw.mybatis.pojo.TbGoodsKz;
import com.lw.mybatis.pojo.TbOrder;
import com.lw.mybatis.utils.MyBatisUtil;
import org.junit.Test;

/**
 * @author Administrator
 * @version 1.0
 * @description:
 * @date 2022/3/2 21:06
 */
public class MyBatis {

    @Test
    public void test01(){
        OrderMapper mapper = MyBatisUtil.getMapper(OrderMapper.class);
        TbOrder order = mapper.findByIdWithItem("9aaccd40ba9943bdaf0487018f37c117");
        System.err.println(order);
    }

    @Test
    public void test02(){
        ItemMapper mapper = MyBatisUtil.getMapper(ItemMapper.class);
        TbGoodsKz tbGoods = mapper.findByIdWithOrder(1L);
        System.err.println(tbGoods);
    }
}
